<?php
namespace Common\Model;
use Think\Model;
class SmsLogModel extends Model{
    public function addlog($phone,$text,$sms_result)
    {
        $data['phone'] = $phone;
        $data['send_time'] = time();
        $user = M('Member')->field('id')->where(array('username'=>$phone))->find();
        $data['uid'] = $user ? $user['id'] : 0;
        $data['content'] = $text;
        $data['original'] = $sms_result;
        $this->add($data);
    }
}